import React from 'react'
import {
    View
} from 'react-native';
import Root from './containers/RootContainer';

import { createStore, applyMiddleware, combineReducers } from 'redux';
import { Provider } from 'react-redux';
import thunk from 'redux-thunk';

import * as reducers from './reducers';

const createStoreWithMiddleware = applyMiddleware(thunk)(createStore);
const reducer = combineReducers(reducers);
const store = createStoreWithMiddleware(reducer);

export default class App extends React.Component{
    // 构造
    constructor(props) {
        super(props);
        // 初始状态
    }

    render(){
        return(
            <Provider store={store}>
              <Root {...this.props}/>
            </Provider>
        )
    }
}
